function openOnClick() {
    open('windowTest.html', '', 'top=200,left=300,height=300,width=400')
}

function setTime(time) {
    if(time>0){
        var clocks = document.getElementById("clockshow");
        clocks.value = time + 's后关闭';
        getTime = setTimeout('setTime()', time*1000)
    }else{
        close();
    }
}

function cancel() {
    if (getTime != undefined) {
        clearTimeout(timer);
        var clocks = document.getElementById('clockshow');
        clocks.value='定时器取消';
    }
}